3.74 \(\int \frac {(d+e x) (2-3 x+x^2)}{4-5 x^2+x^4} \, dx\)

Optimal. Leaf size=22 \[ (d-e) \log (x+1)-(d-2 e) \log (x+2) \]

[Out]

(d-e)*ln(1+x)-(d-2*e)*ln(2+x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1586, 632, 31} \[ (d-e) \log (x+1)-(d-2 e) \log (x+2) \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(2 - 3*x + x^2))/(4 - 5*x^2 + x^4),x]

[Out]

(d - e)*Log[1 + x] - (d - 2*e)*Log[2 + x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rubi steps

\begin {align*} \int \frac {(d+e x) \left (2-3 x+x^2\right )}{4-5 x^2+x^4} \, dx &=\int \frac {d+e x}{2+3 x+x^2} \, dx\\ &=-\left ((d-2 e) \int \frac {1}{2+x} \, dx\right )+(d-e) \int \frac {1}{1+x} \, dx\\ &=(d-e) \log (1+x)-(d-2 e) \log (2+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 23, normalized size = 1.05 \[ (d-e) \log (x+1)+(2 e-d) \log (x+2) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(2 - 3*x + x^2))/(4 - 5*x^2 + x^4),x]

[Out]

(d - e)*Log[1 + x] + (-d + 2*e)*Log[2 + x]

________________________________________________________________________________________

fricas [A]  time = 0.83, size = 22, normalized size = 1.00 \[ -{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + {\left (d - e\right )} \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="fricas")

[Out]

-(d - 2*e)*log(x + 2) + (d - e)*log(x + 1)

________________________________________________________________________________________

giac [A]  time = 0.29, size = 26, normalized size = 1.18 \[ -{\left (d - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + {\left (d - e\right )} \log \left ({\left | x + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="giac")

[Out]

-(d - 2*e)*log(abs(x + 2)) + (d - e)*log(abs(x + 1))

________________________________________________________________________________________

maple [A]  time = 0.00, size = 29, normalized size = 1.32 \[ -d \ln \left (x +2\right )+d \ln \left (x +1\right )+2 e \ln \left (x +2\right )-e \ln \left (x +1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x)

[Out]

d*ln(x+1)-e*ln(x+1)-d*ln(x+2)+2*e*ln(x+2)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 22, normalized size = 1.00 \[ -{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + {\left (d - e\right )} \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(x^2-3*x+2)/(x^4-5*x^2+4),x, algorithm="maxima")

[Out]

-(d - 2*e)*log(x + 2) + (d - e)*log(x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.80, size = 22, normalized size = 1.00 \[ \ln \left (x+1\right )\,\left (d-e\right )-\ln \left (x+2\right )\,\left (d-2\,e\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*x)*(x^2 - 3*x + 2))/(x^4 - 5*x^2 + 4),x)

[Out]

log(x + 1)*(d - e) - log(x + 2)*(d - 2*e)

________________________________________________________________________________________

sympy [A]  time = 0.28, size = 29, normalized size = 1.32 \[ \left (- d + 2 e\right ) \log {\left (x + \frac {4 d - 6 e}{2 d - 3 e} \right )} + \left (d - e\right ) \log {\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(x**2-3*x+2)/(x**4-5*x**2+4),x)

[Out]

(-d + 2*e)*log(x + (4*d - 6*e)/(2*d - 3*e)) + (d - e)*log(x + 1)

________________________________________________________________________________________